home *** CD-ROM | disk | FTP | other *** search
/ Complete Internet Archive / Complete Internet Archive.iso / Web Boards / WebForum_tar(2).Z / WebForum_tar(2) / WebForum / src / mkaccess.pl < prev    next >
Encoding:
Text File  |  1995-01-19  |  882 b   |  51 lines

  1. #
  2. # mkaccess.pl: make an access file
  3. #
  4. # Copyright (C) 1994, Afzal Ballim
  5. #
  6. # Last Modified: DATE
  7. # arguments: 1st is access file name
  8. #            2nd is password file name
  9. #            3rd is group file name
  10. #            if there's a 4th argument, that indicates that
  11. #              webforum should also be put into the group
  12.  
  13. $i=@ARGV[0];
  14. $pf=@ARGV[1];
  15. $gf=@ARGV[2];
  16. if ($#ARGV=3 && @ARGV[3] eq "all") {
  17.  $WF='all';
  18. } else {
  19.  $WF='master';
  20. }
  21.  
  22. open(F,">$i") || die "Couldn't make $i\n";
  23. print F <<EOM;
  24. AuthUserFile $pf
  25. AuthGroupFile $gf
  26. AuthName WebForum
  27. AuthType Basic
  28. EOM
  29.  
  30. if ($WF eq 'all') {
  31. print F <<EOM1;
  32. <Limit POST>
  33. require group webmasters
  34. require group webforum
  35. </Limit>
  36. <Limit GET>
  37. require group webmasters
  38. require group webforum
  39. </Limit>
  40. EOM1
  41. } else {
  42. print F <<EOM2;
  43. <Limit POST>
  44. require group webmasters
  45. </Limit>
  46. <Limit GET>
  47. require group webmasters
  48. </Limit>
  49. EOM2
  50. }
  51.